import 'package:flutter/material.dart';
import 'package:myapp/common/dio_api_common.dart';

class NewRouteDio extends StatefulWidget {
  @override
  _NewRouteDioState createState() => _NewRouteDioState();
}

class _NewRouteDioState extends State<NewRouteDio> {
  String text = "bb";
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("New route"),
      ),
      body: Column(
        children: <Widget>[
            RaisedButton(
              child: Text("test"),
              onPressed: () async {
                var Str = await myAppApiCommon.getHostHealthPing();
                setState(() {
                  text = Str;
                });
              },
            ),
          Text("$text")
        ],
      ),
    );
  }
}
